﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SM_Accredit.aspx.cs" Inherits="ZLDC.Estate.TM.SM_Accredit" Theme="NewSkin"%>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>业务提成计算方式明细</title>
    <link href="../../cssnew/page.css" rel="stylesheet" type="text/css" />
    <link href="../../App_Themes/NewSkin/css.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript">
    function SetValue()
    {
        var inputs = document.forms[0].elements;
        var strValue="";
        //var j=0;
        for (var i=0; i < inputs.length; i++)
        {
            
            if (inputs[i].type == 'checkbox')
            {
                
                if(inputs[i].checked)
                {
                    strValue+=inputs[i].value+","+"1"+"|";
                }
                else
                {
                    strValue+=inputs[i].value+","+"0"+"|";
                }
                //j++;
            }
            
        }
        //alert(j);
        strValue=strValue.substring(0,strValue.length-1);
        document.getElementById("txtValue").value=strValue;
        document.getElementById("btnSaveData").click();
        //alert(strValue);
    }
    
    function hidDiv(id)
    {
        if(document.getElementById("div"+id).style.display=="none")
        {
            document.getElementById("div"+id).style.display="block";
            document.getElementById("img"+id).src="../../images/WebResourceJIAN.jpg";
        }else
        {
            document.getElementById("div"+id).style.display="none";
            document.getElementById("img"+id).src="../../images/WebResourceJIA.jpg";
        }
        //alert(id);
    }
    </script>

    <style>
        .mainField
        {
            margin: 10px 6px 5px 10px;
            border: 0px solid #eee;
            clear: both;
            text-align: left;
        }
        span
        {
            font-size: 12px;
        }
        th
        {
            font-size: 12px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
        <div id="hbNav">
        <div id="navLeft">
            <img src="../../images/zlTitle.gif" width="13" align="absmiddle" />&nbsp;&nbsp;当前功能<span
                class="hbdot">&raquo;</span>角色授权</div>
        <div id="navRght">
        </div>
    </div>
    <fieldset class="mainField">
        <div id="dvTable">
            <table id="table1" border="0" cellpadding="0" cellspacing="0" class="datagrid-style"
                style="width: 100%">
                <thead>
                    <tr class="datagrid-headerstyle">
                        <th class="datagrid-headercolor" align="center" style="width: 110px;">
                            模块
                        </th>
                        <th class="datagrid-headercolor" align="center">
                            权限
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <asp:DataList ID="dlistData" runat="server" RepeatLayout="Flow" RepeatDirection="Horizontal"
                        OnItemDataBound="dlistData_ItemDataBound" BorderWidth="0px">
                        <ItemTemplate>
                            <tr onmouseover="this.style.backgroundColor = '#f2f2f2';" onmouseout="this.style.backgroundColor = '';">
                                <td class="datagrid-style" align="left" valign="top">
                                    <b>
                                        <asp:Literal ID="ltMdl" runat="server"></asp:Literal></b>
                                </td>
                                <td class="datagrid-style" align="left" id="divAction">
                                    <asp:Literal ID="ltChkList" runat="server"></asp:Literal>
                                    <asp:HiddenField ID="txtMdl" runat="server" Value='<%# Eval("mdl")%>' />
                                </td>
                            </tr>
                        </ItemTemplate>
                    </asp:DataList>
                </tbody>
            </table>
        </div>
    </fieldset>
    <div class="dvBtn">
       <input type="button" id="btnSave" value="保存" onclick="SetValue()" class="button_bak" />
                        <asp:Button ID="btnSaveData" runat="server" OnClick="btnSaveData_Click" Style="display: none" />
                        <input type="hidden" id="txtValue" runat="server" style="width: 0px" />
                        <asp:Button ID="btnCancle" runat="server" Text="取消" OnClick="btnCancle_Click" CssClass="button_bak" />
    </div>
    </form>
</body>
</html>
